# from mpl_fund_flow import fund_flow
# fund_flow(ts_name = "安凯微",ts_code = "688620")

import akshare as ak
import sqlite3
import pandas as pd

# df_holder = ak.stock_zh_a_gdhs("最新")
# 分析户均持股量（户均持股 ↑ → 筹码集中）
# df_holder["户均持股"] = df_holder["总股本"] * 1e4 / df_holder["股东户数"]  # 单位：股/户
# print(df_holder[["日期", "股东户数", "户均持股"]])

# with sqlite3.connect("example.db") as conn: df_holder.to_sql("stock_zh_a_gdhs_最新",conn,if_exists="replace",index=False)

ts_code = '000733'

with sqlite3.connect("example.db") as conn:
    df = pd.read_sql(f"select * from stock_zh_a_gdhs_最新 where 代码 = '{ts_code}' ",conn)
    ...
